<link href="<?php echo DOMAIN; ?>/css/my-style.css" rel="stylesheet" type="text/css" />
<?php $data= $this->data;  ?>

<?php 
	if($this->success){
	?>
		<div class="notification success" >
			<span class="strong">Thao tác thành công.</span>
			<span class="close" title="Dismiss"></span>
		</div>
		<?php
	}
	
	if($this->warning){
		?>
			<div class="notification warning" >
				<span class="strong">Dữ liệu bạn nhập còn thiếu. Xin vui lòng kiểm tra lại!</span>
				<span class="close" title="Dismiss"></span>
			</div>
			<?php
		}
?>

<form method="post" class="form" action="<?php echo DOMAIN_INDEX.'/admin/subjects/add'?>" enctype="multipart/form-data">
      <fieldset>
        <legend>Thêm thông tin học phần</legend>
     
        <p class='row-form'>
          <label class='title-row' for="City">Mã học phần <span class="required">*</span>:</label>
          <input style="width:250px;"  type="text" name="code" value="<?php echo $data['code']; ?>"  />
        </p>
        <p class='row-form'>
          <label class='title-row' for="City">Tên học phần <span class="required">*</span>:</label>
          <input style="width:250px;"  type="text" name="name" value="<?php echo $data['name'] ?>" />
        </p>
        <p class='row-form'>
          <label class='title-row' for="City">Số TC<span class="required">*</span>:</label>
          <input style="width:250px;"  type="text" name="weight" value="<?php echo $data['weight'] ?>" />
        </p>
        <p class='row-form'>
          <label class='title-row' for="City">Room <span class="required">*</span>:</label>
          
          <select name="id_room">
            <?php
              $room = $this->room;
              foreach ($room as $key => $value) {
                  echo "<option value='".$value["id"]."'>".$value["name"]."</option>";
              }
            ?>
          </select>
        </p>
        <p class='row-form'>
          <label class='title-row' for="City">Kỳ <span class="required">*</span>:</label>
          
          <select name="id_semester">
            <?php
              $semester = $this->semester;
              foreach ($semester as $key => $value) {
                  echo "<option value='".$value["id"]."'>".$value["name"]."</option>";
              }
            ?>
          </select>
        </p>
        <p class='row-form'>
          <label class='title-row' for="City">Giáo viên <span class="required">*</span>:</label>
         
          <select name="id_teachers">
            <?php
              $teacher = $this->teacher;
              foreach ($teacher as $key => $value) {
                  echo "<option value='".$value["id"]."'>".$value["name"]."</option>";
              }
            ?>
          </select>
        </p>
       
      
        <p class='row-form'>
        	<input class="blue" style="margin-bottom:-10px;" type="submit" name="submit" value="Thêm"/>
            <input class='blue' style="margin-bottom:-10px;"  onclick="javascript:window.location='<?php echo DOMAIN_INDEX ?>/admin/subjects'; return false;" value="Hủy bỏ" type="button"/>
        </p>
      </fieldset>
</form>
